import { App } from "vue";
import { createPinia } from "pinia";
import { router } from "../router";
import "virtual:svg-icons-register";
// 引用通用封装组件
import SvgIcon from "../components/svg-icon/index";
import { initAntd } from "./init-antd";
import http from "@/http";
import loading from "./loading";
import "lib-flexible";

const init = (app: App) => {
  app.config.globalProperties.http = http;
  app.use(createPinia());
  app.use(router);
  app.use(SvgIcon);
  app.use(loading);
  initAntd(app);
};

export { init };
